﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YuuzleComic.DBUtility;

public partial class support_recommend : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSend_Click(object sender, EventArgs e)
    {
        try
        {
            SqlParameter[] parameters = new SqlParameter[]{ 
                new SqlParameter("@mhmc",Request.Form["txtTitle"]),
                new SqlParameter("@mhzz",Request.Form["txtAuthor"]),
                new SqlParameter("@class",CheckBoxList1.SelectedValue),
                new SqlParameter("@diqu",CheckBoxList2.SelectedValue),
                new SqlParameter("@url",Request.Form["txtUrl"]),
                new SqlParameter("@intro",Request["txtIntro"]),
                new SqlParameter("@nick",Request["txtNick"]),
                new SqlParameter("@contact",Request["txtContact"])
            };
            DbHelperSQL.ExecuteSql("insert into recommend values(@mhmc,@mhzz,@class,@diqu,@url,@intro,@nick,@contact,getDate())", parameters);
            Response.Write("<script>alert('推荐漫画成功！');window.close();</script>");
        }
        catch (Exception ex)
        {
            Response.Write("<script>alert('推荐漫画失败！请稍后再试！');window.close();</script>");
        }
    }
}